fix(swift-ios): reopened threads no longer show stale history after swipe back - #11491
Conversation
…wipe back Leaving a thread with the swipe-back gesture cleared the selection, which destroyed the thread view while the split view was still finishing its interactive pop. The next open of that thread received onAppear followed by a spurious onDisappear, and releaseThread cancelled the load before it could subscribe or arm the HTTP fallback. The view then showed the cached transcript with no sync indicator until the user backed out and reopened. Collapse the compact column on swipe back and keep the selection, which is what the system back button already does. The view is re-shown instead of recreated, its task re-runs, and the cached resume replays new events. Model: Claude Fable 5.1. Harness: Claude Code inside T3 Code.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized Swift navigation bug fix that preserves the selected thread during swipe-back, plus a dependency pin retaining the existing resolved Expo Audio version. The changes are limited in scope and do not introduce a new capability, schema change, sensitive behavior, or production infrastructure change. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Release Smoke failure is inherited from the base branch, not this change. The job fails in
|
…ingdotgg#11426) (cherry picked from commit 18d8cbf)
|
Pushed 57617af, a cherry-pick of main's #11426 (pin |
Dismissing prior approval to re-evaluate 57617af
What Changed
On compact width, the swipe-back gesture now only collapses the split view column. It no longer clears the thread selection. This is the same thing the system back button does, so the thread view is re-shown rather than destroyed and recreated. One line in
WorkspaceView.swiftplus a comment explaining why.Why
Reopening a thread after leaving it with swipe back showed the cached transcript and never caught up. No pill, no updates, until the user backed out and reopened. It was most visible after a background trip because new content had arrived in the meantime.
Instrumenting the simulator build showed the sequence:
selectedThreadID, destroying the thread view while the split view was still finishing its interactive pop.onAppearfollowed by a spuriousonDisappearwhile still on screen.releaseThread, which cancelled the load before it subscribed to the socket or armed the HTTP fallback.Leaving with the nav-bar back button keeps the selection and re-shows the same view, and every reopen on that path was fresh. Making the swipe path do the same removes the trigger.
Lifecycle log, before (the reopen is instance 3D1EF3):
After, same flow:
Verification
synchronized. Also verified the swipe, background, foreground, reopen variant.CI note
Also carries 57617af, a cherry-pick of main's #11426 pinning
expo-audioto57.0.4. Without it Release Smoke fails on this base branch for every PR (the~57.0.4range now resolves to 57.0.5 and the pnpm patch keyed to 57.0.4 goes unused). Two lines, no behavior change; drops out cleanly ifmainis merged into the branch first.Checklist
Model: Claude Fable 5.1. Harness: Claude Code inside T3 Code.